Skip to content

Conversation

@intaniger
Copy link
Contributor

@intaniger intaniger commented Jun 26, 2025

What I did

Tip

Add a custom list component to demonstrate how to display data with custom cell rendering.

see renderFoodsCells for reference.

Screen.Recording.2568-06-28.at.18.52.43.mov

And why I did it

Why not?

Just kidding;

Because currently the server doesn't have filter functionality. The only way to do this is via client-side, which will be sophisticated and troublesome; i.e., filtering data that are limited to the first n records would give the user an incomplete result.

Nevertheless, providing a trivial filter, such as like would not be sufficient for real-world use cases. So it's better to give them all operators that drizzle provided. Along with type-safety capability, that would help developers from foot-gunning themselves by mistyping or unknowingly using the where filter in a misconceived way.

And I believe that supporting nested query, i.e.,

{
  "$or": [
    {
      "$and": [
        { "text": { "$like": "%A%" } },
        {
          "$or": [
            { "smallint": { "$inArray": [4, 3, 2, 1] } },
            { "real": { "$gte": 30 } }
          ]
        }
      ]
    }
  ],
  "boolean": { "$eq": true }
}

is necessary for, possibly, complex filtering use cases.

The added /admin/collections/custom-food-page is intended to demonstrate how to use a filter in source code.

@changeset-bot
Copy link

changeset-bot bot commented Jun 26, 2025

🦋 Changeset detected

Latest commit: 4cdd64f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@example/erp Minor
@genseki/react Minor
@example/ui-playground Patch
@genseki/next Minor
@genseki/plugins Minor
@genseki/react-query Minor
@genseki/rest Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@intaniger intaniger force-pushed the intaniger/find-many-filter branch from 2330a86 to 202f7fc Compare June 26, 2025 16:10
@intaniger intaniger force-pushed the intaniger/find-many-filter branch from dd8672c to aa95733 Compare June 27, 2025 15:28
@intaniger intaniger marked this pull request as draft June 27, 2025 16:00
@intaniger intaniger force-pushed the intaniger/find-many-filter branch from 30fe73f to e14108e Compare June 27, 2025 18:02
@intaniger intaniger force-pushed the intaniger/find-many-filter branch from e14108e to 44bca04 Compare June 27, 2025 18:03
@intaniger intaniger changed the title WIP: findMany filter findMany method's where Jun 28, 2025
@intaniger intaniger marked this pull request as ready for review June 28, 2025 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant